<xsl:stylesheet version="1.1"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:our="http://www.ouroboroswiki.com/ext">

  <xsl:output method="xml" indent="yes" />

  <xsl:param name="wiki-base" />
  <xsl:param name="input-mime-type">text/plain</xsl:param>
  <xsl:param name="input-path"/>
  <xsl:param name="input-repo"/>
  <xsl:param name="input-editable">false</xsl:param>
  <xsl:param name="original-pipe"><xsl:value-of select="$input-repo"/></xsl:param>

  <xsl:template match="/">
    <div>
      <h1>Repositories</h1>
      <table>
        <tr>
          <th>Name</th><th>Writable</th><th>Description</th>
        </tr>
        <xsl:for-each select="content/original/repositories/repository">
          <tr>
            <td>
              <xsl:choose>
                <xsl:when test="@listable = true()">
                <our:link repo="repo.view" path="{@name}" mode="absoluteReplace"><xsl:value-of select="@name"/></our:link>
                </xsl:when>
                <xsl:otherwise>
                <xsl:value-of select="@name"/>
                </xsl:otherwise>
              </xsl:choose>
            </td>
            <td>
              <xsl:value-of select="@writable"/>
            </td>
            <td>
              <xsl:value-of select="."/>
            </td>
          </tr>
        </xsl:for-each>
      </table>
    </div>
  </xsl:template>

</xsl:stylesheet>